Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced transparent SVG with PNG to fix accessibility issues on dark mode #27

Conversation

kostasx
Copy link
Contributor

@kostasx kostasx commented Nov 6, 2023

Description

accessibility issues

As you can see from the screenshot, there are some issues when browsing the content in GitHub's dark mode.

The SVG are transparent with black strokes, which makes it impossible to see.

The SVG files have been replaced by PNG files which include a white background. The SVG files have not been removed.

  • Before (check in dark mode)
  • After (check in dark mode)

Checklists

General Checks

  • the branch is up to date with main/master
  • the code works when pulled and run locally
  • PR has a descriptive title
  • reviewers are assigned
  • the PR contributes only one focused change
  • has short and clear description

@kostasx kostasx added the enhancement New feature or request label Nov 6, 2023
@kostasx kostasx self-assigned this Nov 6, 2023
@kostasx kostasx requested a review from yoshimalaise November 6, 2023 11:15
Copy link

@yoshimalaise yoshimalaise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, will approve for now

Seems like in general we should update our stylesheets with a media query to check for dark mode and then invert the SVG so we don't lose out on the scalability of the SVG's.

Something akin to

@media (prefers-color-scheme: dark) {
img {
-webkit-filter: invert(.75);
filter: invert(.75)
}
}

@colevandersWands is there a global style sheet for the generated website where these changes can be made?

@kostasx
Copy link
Contributor Author

kostasx commented Nov 6, 2023

Would it make sense to try and figure out how to embed a white background directly into the SVG? @yoshimalaise

Update: I just saw that the SVG has a white fill. The problem seems to lie elsewhere...

@colevandersWands
Copy link
Member

I'm merging this for now so the site woks, thanks for the PR @kostasx!

@yoshimalaise , I didn't know something like a global style sheet for SVGs existed. That does sound like a good way to go. Especially if already having a white background isn't enough

@colevandersWands colevandersWands merged commit 153e50c into DeNepo:main Nov 6, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants